Connectors are widely used and generally include plugs and sockets. The plug is a male head, and an inserted pin is arranged thereon. The socket is used as a female head, and a contact pin is arranged therein. The inserted pin can be inserted into the socket to make electrical contact with the contact pin in the socket to realize electrical conduction between the power source and the electric device. When the plug and the socket are connected, it is easy to separate the two due to external factors, resulting in failure of the electrical connection, which may cause serious consequences.